#include <rpcFw\Variant.h>


Variant::Variant(){
		dataType = VAR_NULL;
	}

Variant::Variant(const int iData){
		this->iData = iData;
		dataType = VAR_INT;
	}

Variant::Variant(const double dData){
		this->dData = dData;
		dataType = VAR_DOUBLE;
	}
Variant::Variant(void* pData){
		this->pData = pData;
		dataType = VAR_PTR;
	}

Variant::Variant(const bool bData){
		this->bData = bData;
		dataType = VAR_BOOL;
	}

Variant::Variant(const std::string &strData){
		this->strData = strData;
		dataType = VAR_STRING;
	}


Variant::Variant(const std::vector<Variant> &vecVar){
		this->vecData = vecVar;
		this->dataType = VAR_VECTOR;
}

Variant::Variant(const std::map<std::string,Variant> &varMap){
		this->mapData = varMap;
		this->dataType = VAR_MAP;
	}

void Variant::operator = (const bool& b)
	{
		this->dataType = VAR_BOOL;
		this->bData = b;
	}

void Variant::operator = (const int& b)
	{
		this->dataType = VAR_INT;
		this->iData = b;
	}

void Variant::operator = (const double& b)
{
	this->dataType = VAR_DOUBLE;
	this->dData = b;
}

void Variant::operator = (const std::string& strData)
{
    this->dataType = VAR_STRING;
	this->strData = strData;
}